import React from 'react'


export default class DemoOne extends React.Component {
  constructor(props) {
    super(props)
    this.cb = this.cb.bind(this)
    this.state = {
      value: 'skbvjs'
    }
  }


  cb() {
    this.props.callBack(this.state.value)
  }

  componentDidMount() {
    console.log(this.props, 'props')
  }

  render() {
    return (
      <div className="demo-test">
        <button onClick={this.cb}>测试父子组件传值按钮</button>
        <div className="box-list">
          
        </div>
      </div>
    )
  }
}